<%@page import="com.ambow.Entity.*"%>

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta name="Keywords" content="关键词1,关键词2，关键词3,关键词4,……" />
<meta name="Description" content="你网页的简述" />
<meta name="Robots" content="All" />
<meta name="Generator" content="Dreamweaver" />
<title>菜单管理</title>
<link href="<%=path%>/static/css/css.css" rel="stylesheet"
	type="text/css" />

</head>

<body>
	<h3 id="subTitle">入库报销－按供应商</h3>

	<form action="<%=path%>/PaymentServlet?status=querySupply"
		method="post" name="form2" id="form2">
		<table width="90%" border="0" align="center" cellpadding="0"
			cellspacing="0" class="table2">
			<tr>
				<td nowrap="nowrap">按供应商名查询：</td>
				<td nowrap="nowrap"><input type="text" name="supplyName" /> <input
					name="Submit" type="submit" class="buttonInp" value="查 询" /></td>
			</tr>
			</form>
			<form action="<%=path%>/PaymentServlet?status=pay" method="post" name="frm" >
				<table width="90%" border="0" align="center" cellpadding="0"
					cellspacing="0" class="table">
					<tr>
						<th width="10%" align="center" nowrap="nowrap" class="title2">操作</th>
						<th width="15%" align="center" nowrap="nowrap" class="title2">书籍</th>
						<th width="13%" align="center" nowrap="nowrap" class="title2">数目</th>
						<th width="24%" align="center" nowrap="nowrap" class="title2">供应商</th>
						<th width="18%" align="center" nowrap="nowrap" class="title2">入库时间</th>
						<th width="20%" align="15%" nowrap="nowrap" class="title2">总金额</th>
					</tr>
					<%
						List<Payment> payments = (List) request.getAttribute("payments");
						List total = (List) request.getAttribute("total");
						if (payments != null && !payments.isEmpty()) {
							for (int i = 0; i < payments.size(); i++) {
					%>
					<tr class="within2bg">
						<td align="center" class="font_hilite"><input
							name="receive_id" type="radio"
							value="<%=payments.get(i).getId()%>" checked="checked"/></td>
						<td align="center"><%=payments.get(i).getStockReceive().getTextBook().getName()%></td>
						<td align="center"><%=payments.get(i).getStockReceive().getAmount()%></td>
						<td align="center"><%=payments.get(i).getStockReceive().getSupplier().getName()%></td>
						<td align="center"><span class="font_hilite"><%=payments.get(i).getStockReceive().getReceiveDate()%></span></td>
						<td align="center" class="font_hilite"><%=total.get(i)%></td>
					</tr>
					<%
						}
						} else {
					%>
					<tr align="center" class="within2bg">
						<td colspan="7" class="no_note">没有符合条件的记录</td>
					</tr>
					<%
						}
					%>
				</table>
				<ul id="button">
					<li><input type="submit" value="报销" ></input></li>
				</ul>
			</form>
			</body>
</html>